#include<iostream>
using namespace std;

int count1;
void dfs(int n){
	if(n==1){

		return ;
	}else{
		if(n%2==0){
			count1++;
			dfs(n/2);
		}
		else{
			count1++;
			dfs((3*n+1)/2);
		}
	}
}

int main(){
	int n;
	cin>>n;
	dfs(n);
	cout<<count1<<endl;
	return 0;

}